package com.consumersave.feign;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class WarehouseFallBackFactory implements FallbackFactory<WarehouseFeign> {

    @Override
    public WarehouseFeign create(Throwable cause) {
        //new一个仓库远程调用的实例并返回
        return new WarehouseFeign() {
            @Override
            public String toString() {
                return "";
            }
        };
    }
}
